package com.dindang.propertyfee.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.dindang.propertyfee.mvp.contract.QrCodeCollectionContract;
import com.dindang.propertyfee.mvp.model.QrCodeCollectionModel;


@Module
public class QrCodeCollectionModule {
    private QrCodeCollectionContract.View view;

    /**
     * 构建QrCodeCollectionModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public QrCodeCollectionModule(QrCodeCollectionContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    QrCodeCollectionContract.View provideQrCodeCollectionView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    QrCodeCollectionContract.Model provideQrCodeCollectionModel(QrCodeCollectionModel model) {
        return model;
    }
}